package com.boatAnchorAssistant.pojo.entity;

import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.TableComment;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;
import nirvana.core.domains.ann.AccEntity;
import nirvana.core.domains.entity.DomainBaseEntity;
import nirvana.core.domains.enums.EntityType;


import javax.persistence.Table;
import java.sql.Timestamp;

/**
 * 【描 述】：
 * 【环 境】：J2SE 17
 * 【详 细】：
 *
 * @author 李松林
 * @version v1.0 2023/11/20 新建
 * @since 2023/11/20
 */
@Data
@Table
@AccEntity(value = "用户操作日志", type = EntityType.SERVICE_ENTITY)
@TableComment("用户操作日志")
public class UserOperationLog extends DomainBaseEntity<UserOperationLog> {

    /**
     * 用户
     */
    @Column(type = MySqlTypeConstant.BIGINT,
            length = 20,
            comment = "用户id",
            isNull = false)
    private Long userId;

//    /**
//     * 登录时间
//     */
//    @Column(type = MySqlTypeConstant.DATETIME,
//            comment = "登录时间",
//            isNull = false)
//    private Timestamp loginTime;


    /**
     * 操作类型
     */
    @Column(type = MySqlTypeConstant.VARCHAR,
            comment = "操作类型",
            isNull = false,
            defaultValue = "")
    private String type;

    /**
     * 操作事件
     */
    @Column(type = MySqlTypeConstant.VARCHAR,
            comment = "操作事件",
            isNull = false,
            defaultValue = "")
    private String operationEvent;

    /**
     * 操作内容
     */
    @Column(type = MySqlTypeConstant.TEXT,
            comment = "操作内容")
    private String operationContent;

    /**
     * 操作时间
     */
    @Column(type = MySqlTypeConstant.DATETIME,
            comment = "登录时间",
            isNull = false)
    private Timestamp operationTime;


    /**
     * ip
     */
    @Column(type = MySqlTypeConstant.VARCHAR,
            comment = "ip地址",
            isNull = false,
            defaultValue = "")
    private String ipAddress;

}
